package com.wzy.web.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * PmAffix entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "pm_affix", catalog = "saozhe")
public class PmAffix implements java.io.Serializable {

	// Fields

	private Integer affixId;
	private PmUser pmUser;
	private String affixName;
	private String affixDetail;
	private String affixUrl;
	private String dateTime;
	private PmProject pmProject;
	// Constructors

	/** default constructor */
	public PmAffix() {
	}

	/** minimal constructor */
	public PmAffix(PmUser pmUser, String affixName, String affixUrl,
			String dateTime,PmProject pmProject) {
		this.pmUser = pmUser;
		this.affixName = affixName;
		this.affixUrl = affixUrl;
		this.dateTime = dateTime;
		this.pmProject = pmProject;
	}

	/** full constructor */
	public PmAffix(PmUser pmUser, String affixName, String affixDetail,
			String affixUrl, String dateTime) {
		this.pmUser = pmUser;
		this.affixName = affixName;
		this.affixDetail = affixDetail;
		this.affixUrl = affixUrl;
		this.dateTime = dateTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "affixId", unique = true, nullable = false)
	public Integer getAffixId() {
		return this.affixId;
	}

	public void setAffixId(Integer affixId) {
		this.affixId = affixId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "publisher", nullable = false)
	public PmUser getPmUser() {
		return this.pmUser;
	}

	public void setPmUser(PmUser pmUser) {
		this.pmUser = pmUser;
	}

	@Column(name = "affixName", nullable = false, length = 100)
	public String getAffixName() {
		return this.affixName;
	}

	public void setAffixName(String affixName) {
		this.affixName = affixName;
	}

	@Column(name = "affixDetail", length = 500)
	public String getAffixDetail() {
		return this.affixDetail;
	}

	public void setAffixDetail(String affixDetail) {
		this.affixDetail = affixDetail;
	}

	@Column(name = "affixUrl", nullable = false, length = 300)
	public String getAffixUrl() {
		return this.affixUrl;
	}

	public void setAffixUrl(String affixUrl) {
		this.affixUrl = affixUrl;
	}

	@Column(name = "dateTime", nullable = false, length = 20)
	public String getDateTime() {
		return this.dateTime;
	}

	public void setDateTime(String dateTime) {
		this.dateTime = dateTime;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "projectId", nullable = false)
	public PmProject getPmProject() {
		return pmProject;
	}

	public void setPmProject(PmProject pmProject) {
		this.pmProject = pmProject;
	}
}